﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApExportToRTRDynamics
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll


namespace DnProcessSimulateCommands.ExportToRTR{

internal class CApExportToRTRDynamics : ICApExportToRTRWriteable
{
  public double m_damping;
  public double m_friction;

  public CApExportToRTRDynamics(double damping, double friction)
  {
    this.m_damping = damping;
    this.m_friction = friction;
  }

  public void Write(CApExportToRTRXmlWriter writer)
  {
    if (this.m_damping == 0.0 & this.m_friction == 0.0)
      return;
    writer.WriteStartElement("dynamics");
    if (this.m_damping != 0.0)
      writer.WriteAttributeString("damping", this.m_damping.ToString() ?? "");
    if (this.m_friction != 0.0)
      writer.WriteAttributeString("friction", this.m_friction.ToString() ?? "");
    writer.WriteEndElement();
  }
}
